/**
 * @filename:TmReportCommissionDao ReportCommission
 * @project wallet-sign  V1.0
 * Copyright(c) 2018 BianPeng Co. Ltd. 
 * All right reserved. 
 */
package com.yixun.qfbao.mapper;

import com.yixun.qfbao.model.ReportCommission;
import com.yixun.qfbao.model.dto.CommissionSummaryDto;
import com.yixun.qfbao.model.dto.CustomerPremisesCommissionDto;
import com.yixun.qfbao.model.dto.IndexCommissionStatisticsDto;
import com.yixun.qfbao.model.dto.ReportCommissionDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**   
 *  
 * @Description:  报备佣金信息表——DAO
 * @Author:       BianPeng   
 * @CreateDate:   ReportCommission
 * @Version:      V1.0
 *    
 */
public interface ReportCommissionMapper {
	
	public ReportCommission selectById(Long id);
	
	public int deleteById(Long id);
	
	public int update(ReportCommission tmReportCommission);

	public int insert(ReportCommission tmReportCommission);

	public List<ReportCommission> queryTmReportCommissionList(ReportCommission tmReportCommission);

	public ReportCommission selectOne(@Param("dto") ReportCommissionDto dto);

	/**
	 * 搜索总数
	 * @param commissionDto 搜索条件
	 * @return 符合条件记录总数
	 */
	public int myCount(@Param("commissionDto")CommissionSummaryDto commissionDto);
	/**
	 * 搜索 - 支持分页
	 * @param commissionDto blackWhiteList(搜索条件)
	 * @param beginNum 分页开始页不包含
	 * @param endNum 分页结束页不包含
	 * @return 分页数据
	 */
	public List<CommissionSummaryDto> myList(@Param("commissionDto")CommissionSummaryDto commissionDto, @Param("beginNum")int beginNum, @Param("endNum")int endNum);

	/**
	 * 搜索总数
	 *
	 * @param commissionDto 搜索条件
	 * @return 符合条件记录总数
	 */
	public int selectCommissionForCaseMemberCount(@Param("commissionDto")CommissionSummaryDto commissionDto,@Param("partnerId")String partnerId);
	/**
	 * 搜索 - 支持分页
	 * @param beginNum 分页开始页不包含
	 * @param endNum 分页结束页不包含
	 * @return 分页数据
	 */
	public List<CommissionSummaryDto> selectCommissionForCaseMember(@Param("commissionDto")CommissionSummaryDto commissionDto,@Param("beginNum")int beginNum,@Param("endNum")int endNum,@Param("partnerId")String partnerId);

	/**
	 *  查询机构佣金详情汇总信息
	 * @param commissionDto
	 * @return
	 */
	public CommissionSummaryDto selectCommissionByPremisesAndCompany(@Param("commissionDto")CommissionSummaryDto commissionDto);

	/***
	 *  机构佣金详情，报备信息列表
	 * @param commissionDto
	 * @param beginNum
	 * @param endNum
	 * @return
	 */
	public List<CustomerPremisesCommissionDto> selectCustomerPremisesCommissionList(@Param("commissionDto")CustomerPremisesCommissionDto commissionDto, @Param("beginNum")int beginNum, @Param("endNum")int endNum);

	public int selectCustomerPremisesCommissionLCount(@Param("commissionDto")CustomerPremisesCommissionDto commissionDto);

	public List<ReportCommission> selectDevCompanyIdList();

	public IndexCommissionStatisticsDto getIndexCommissionStatistics(@Param("commissionDto")IndexCommissionStatisticsDto commissionDto);


}
